| API Documentation |  |

- MAIN PAGE
- NAMESPACES
- CLASSES

Slider.h
1 // Slider.h
3 //
5
6 namespace nkWinUi
7 {
11 enum class SLIDER_DIRECTION
12 {
13 AUTOMATIC = 0,
14 LEFT_TO_RIGHT,
15 RIGHT_TO_LEFT,
16 TOP_TO_BOTTOM,
17 BOTTOM_TO_TOP
18 } ;
19
27 class Slider : public Component
28 {
29 public :
30
38 Slider (System* system) noexcept ;
42 virtual ~Slider () ;
43
44 // Getters
48 float getMin () const ;
52 float getMax () const ;
56 float getCurrent () const ;
60 std::function<void (Slider*, float)> getValueChangeCallback () const ;
64 SLIDER_DIRECTION getDisplayDirection () const ;
65
66 // Setters
72 virtual void setMin (float value) ;
78 virtual void setMax (float value) ;
87 virtual void setCurrent (float value) ;
97 virtual void setValueChangeCallback (std::function<void (Slider*, float)> callback) ;
105 virtual void setDisplayDirection (SLIDER_DIRECTION value) ;
106
107 // Import / Export
108 virtual void exportIntrospection (nkExport::Node* rootNode) override ;
109 virtual void importClassFromTree (nkExport::Node* rootNode) override ;
110
111 public :
112
113 // Statics
121 static nkMemory::UniquePtr<Slider> create (System* system = nullptr) ;
122 } ;
123 }
nkWinUi::SLIDER_DIRECTION::LEFT_TO_RIGHT
@ LEFT_TO_RIGHT
Left to right direction.
nkWinUi::SLIDER_DIRECTION::TOP_TO_BOTTOM
@ TOP_TO_BOTTOM
Top to bottom direction.
nkWinUi::Slider::~Slider
virtual ~Slider()
nkWinUi::Slider::getCurrent
float getCurrent() const
nkWinUi::SLIDER_DIRECTION::RIGHT_TO_LEFT
@ RIGHT_TO_LEFT
Right to left direction.
nkWinUi::Slider::Slider
Slider(System *system) noexcept
nkWinUi::Slider::importClassFromTree
virtual void importClassFromTree(nkExport::Node *rootNode) override
nkWinUi::SLIDER_DIRECTION::BOTTOM_TO_TOP
@ BOTTOM_TO_TOP
Bottom to top direction.
nkWinUi::Slider::create
static nkMemory::UniquePtr< Slider > create(System *system=nullptr)
nkWinUi::Slider::getValueChangeCallback
std::function< void(Slider *, float)> getValueChangeCallback() const
nkWinUi::Slider::setMax
virtual void setMax(float value)
nkWinUi::Component
Base class for any graphical component.
Definition: Component.h:12
nkWinUi::System
The main system of the component.
Definition: System.h:18
nkWinUi::Slider::exportIntrospection
virtual void exportIntrospection(nkExport::Node *rootNode) override
nkWinUi::Slider::getMax
float getMax() const
nkExport::Node
A node in the tree structure representing the data to export / import.
Definition: Node.h:42
nkWinUi::Slider::setCurrent
virtual void setCurrent(float value)
nkWinUi::SLIDER_DIRECTION::AUTOMATIC
@ AUTOMATIC
Automatic direction, adapting to the size of the component. Left to right if wider,...
nkMemory::UniquePtr
Smart pointer owning the object instance it encapsulates.
Definition: UniquePtr.h:17
nkWinUi::Slider::setDisplayDirection
virtual void setDisplayDirection(SLIDER_DIRECTION value)
nkWinUi::Slider::getDisplayDirection
SLIDER_DIRECTION getDisplayDirection() const
nkWinUi::Slider::setMin
virtual void setMin(float value)
nkWinUi::Slider::getMin
float getMin() const
nkWinUi
Encompasses all API of component NilkinsWinUi.
Definition: Clipboard.h:7
nkWinUi::SLIDER_DIRECTION
SLIDER_DIRECTION
Lists possible slider directions.
Definition: Slider.h:12
nkWinUi::Slider::setValueChangeCallback
virtual void setValueChangeCallback(std::function< void(Slider *, float)> callback)
nkWinUi::Slider
A graphical slider.
Definition: Slider.h:28